feat: add swipe event source metadata#13
Conversation
Add commit-source metadata to swipe events so consumers can distinguish gesture releases from programmatic action commits without app-owned refs. The source value is authored at the dismiss boundary and emitted from the shared commit path, preserving the existing gesture/action motion behavior. Constraint: Keep app-domain analytics labels out of the library payload Constraint: Preserve existing dismiss, reset, and event ordering semantics Rejected: App-owned pending source refs | brittle and can drift from commit lifecycle Rejected: Optional source field | weakens the event payload contract and analytics reliability Confidence: high Scope-risk: moderate Tested: yarn format; yarn typecheck --pretty false; yarn lint Tested: yarn format:check; yarn jest --runInBand --watchman=false; yarn build Tested: git diff --check Not-tested: Manual device gesture analytics integration
🦋 Changeset detectedLatest commit: c108831 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1088310b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,24 @@ | |||
| --- | |||
| '@react-native-motion-kit/swipe-deck': minor | |||
There was a problem hiding this comment.
Mark required SwipeEvent source as major
This changeset publishes a minor release, but the same change makes source a required member of the exported SwipeEvent<T> type at src/types.ts:36 and notes that object literals, fixtures, or useDeckEvent('swipe', initialValue) values must now be updated. Consumers can take this as a minor upgrade and have TypeScript builds fail, so either make source optional/backward-compatible or change this changeset to major.
Useful? React with 👍 / 👎.
Add commit-source metadata to swipe events so consumers can distinguish gesture releases from programmatic action commits without app-owned refs.
The source value is authored at the dismiss boundary and emitted from the shared commit path, preserving the existing gesture/action motion behavior.